import request from '@/utils/request'

// 查询楼层列表
export function listFloor(query) {
  return request({
    url: '/floor/page',
    method: 'get',
    params: query
  })
}

// 查询[空间] 楼层详细
export function getFloor(floorId) {
  return request({
    url: '/floor/' + floorId,
    method: 'get'
  })
}

// 新增[空间] 楼层
export function addFloor(data) {
  return request({
    url: '/floor/add',
    method: 'post',
    data: data
  })
}

// 修改[空间] 楼层
export function updateFloor(data) {
  return request({
    url: '/floor/update',
    method: 'put',
    data: data
  })
}

// 删除[空间] 楼层
export function delFloor(floorId) {
  return request({
    url: '/floor/delete/' + floorId,
    method: 'delete'
  })
}

export function exportFloor() {
  return request({
    url: "/floor/exportData",
    method: "get",
    responseType: "blob",
  });
}
